package com.tong.embeddedvr.service;

import org.springframework.web.socket.WebSocketSession;

import java.io.IOException;

/**
 * TODO
 *
 * @author gcl
 * @version 1.0
 * @Description
 * @date 2021/3/4 17:43
 */
public interface WebSSHService {

    //这里的业务划分很棒

    /**
     * @Description 初始化ssh连接
     * @Author gcl
     * @Date 2021/3/4 17:54
     * @param: session
     * @Return void
     */
    void initConnection(WebSocketSession session);
    
    /**
     * @Description 处理接收的数据
     * @Author gcl
     * @Date 2021/3/4 17:54
     * @param: buffer
 @param: session
      * @Return void
     */
    void recvHandler(String buffer,WebSocketSession session);
    
    /**
     * @Description 发送信息
     * @Author gcl
     * @Date 2021/3/4 17:54
     * @param: session
 @param: buffer
      * @Return void
     */
    void sendMsg(WebSocketSession session,byte[] buffer) throws IOException;
    
    /*
     * @Description 关闭连接
     * @Author gcl
     * @Date 2021/3/4 17:54
     * @param: session
     * @Return void
     */
    void closeConnection(WebSocketSession session);

}
